<template>
    <div>
        <Loading v-show="showLoading"></Loading>
        <Alert v-show="alert.showAlert"></Alert>
        <router-view class="wrapper"></router-view>
    </div>
</template>
<script>
  import Loading from 'components/loading'
  import Alert from 'components/alert'
  import { mapGetters } from 'vuex'

    export default {
        name: 'App',
        data() {
            return {
                showLoading: false
            }
        },
        components: {
            Loading,
            Alert
        },
        computed: {
            // 使用对象扩展操作符把 getter 混入到 computed 中
            ...mapGetters(['showLoading', 'alert'])
        }
    }
</script>
<style lang="scss">
  @import '~assets/css/reset.scss';
  @import '~assets/css/common.scss';
</style>
